package com.robot.topology.robot.domain;

import java.util.List;

import com.robot.topology.graph.domain.Edge;
import com.robot.topology.graph.domain.Vertex;
import com.robot.topology.path.domain.Path;

public class Robot {

	private Path currentPath;
	private Path unusedEdges;
	private Vertex currentVertex;
	private List<Edge> unusedEdgesList;
	
	private final Vertex initialVertex;
	private final Vertex goalVertex;
	
	public Robot (Vertex initialVertex, Vertex goalVertex, List<Edge> unusedEdges) {
		this.initialVertex=initialVertex;
		this.currentVertex=initialVertex;
		this.goalVertex = goalVertex;
		this.currentPath = new Path();
		this.unusedEdges= new Path(unusedEdges);
		this.unusedEdgesList=unusedEdges;
	}

	public void initializeRobot(){
		this.currentVertex=this.initialVertex;
		this.currentPath = new Path();
		this.unusedEdges=new Path(unusedEdgesList);
	}
	
	public boolean amIInGoalState(){
		return this.currentVertex.equals(goalVertex);
	}
	
	public Path getCurrentPath() {
		return currentPath;
	}

	public Path getUnusedEdges() {
		return unusedEdges;
	}

	public void setUnusedEdges(Path unusedEdges) {
		this.unusedEdges = unusedEdges;
	}

	public Vertex getCurrentVertex() {
		return currentVertex;
	}

	public void setCurrentVertex(Vertex currentVertex) {
		this.currentVertex = currentVertex;
	}

	public Object getGoalVertex() {
		return goalVertex;
	}
	
}
